﻿using MyWeb.Model.User;
using MyWeb.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using MyWeb.Services.Base;
using MyWeb.Business.Base;

namespace MyWeb.Business.System
{
    public interface IUserService : IBaseBusiness<SysUserInfo>
    {
        /// <summary>
        /// 获取用户列表
        /// </summary>
        /// <param name="page"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        Task<PageModel<SysUserInfo>> Get(int page = 1,int pageSize = 50, string key = "");
        /// <summary>
        /// 获取单个用户信息
        /// </summary>
        /// <param name="UserId">用户id</param>
        /// <returns></returns>
        Task<SysUserInfo> GetUserInfo(long UserId);

        /// <summary>
        /// 修改用户信息
        /// </summary>
        /// <param name="sysUserInfo">用户信息</param>
        /// <returns></returns>
        Task<bool> PutUserInfo(SysUserInfo sysUserInfo);

        /// <summary>
        /// 新增用户
        /// </summary>
        /// <param name="sysUserInfo"></param>
        /// <returns></returns>
        Task<bool> PostUserInfo(SysUserInfo sysUserInfo);

        /// <summary>
        /// 删除用户信息
        /// </summary>
        /// <param name="uid">用户Id</param>
        Task<object> DelUserInfo(long uid);
        /// <summary>
        /// 获取用户详情根据token
        /// 【无权限】
        /// </summary>
        /// <param name="token">令牌</param>
        /// <returns></returns>
        Task<SysUserInfo> GetInfoByToken(string token);

        /// <summary>
        /// 重置密码
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns></returns>
        Task<string> RemovePwd(long UserId);
    }
}
